<template>
	<view class="">
		<view class="indexaddlist">
			<view class="indexadditem">
				<text>商品图片</text>
				<u-upload max-count="1" @on-remove="goodsremove()" @on-success="goodssuccess()"></u-upload>
			</view>
			<view class="indexadditem">
				<text>商品名称</text>
				<input type="text" placeholder="请输入商品名称"/>
			</view>
			<view class="indexadditem">
				<text>单价</text>
				<input type="text" placeholder="请输入单价"/>
			</view>
			<view class="indexadditem">
				<text>数量</text>
				<input type="text" placeholder="请输入数量"/>
			</view>
			<view class="indexadditem">
				<text>总价</text>
				<input type="text" placeholder="请输入总价"/>
			</view>
			<view class="indexadditem">
				<text>入库时间</text>
				<input type="text" placeholder="请选择入库时间" @click="show = true" v-model="time"/>
				<u-picker v-model="show" mode="time" @confirm="confirm()"></u-picker>
			</view>
		</view>
		<view class="indexbtn">
			确认提交
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false,
				time:""
			}
		},
		methods: {
			goodsremove(e){
				console.log(e)
			},
			goodssuccess(e){
				console.log(e)
			},
			confirm(e){
				var time = e.year+'-'+e.month+'-'+e.day
				this.time = time
			}
		}
	}
</script>

<style>
.indexaddlist{
	width: 90%;
	margin: 4% 5%;
}
.indexadditem{
	border-bottom: 1px solid #e6e6e6;
	padding:5% 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.indexadditem text{
	width: 160rpx;
	color: #313131;
}
.indexadditem input{
	font-size: 28rpx;
	width: 500rpx;
	color: #828282;
	text-align: right;
}
.indexbtn{
	width: 80%;
	margin: 2% 10%;
	text-align: center;
	background: red;
	font-size: 32rpx;
	line-height: 3;
	color: #fff;
	border-radius: 60rpx;
	margin-top: 100rpx;
}
</style>
